import Cookies from 'js-cookie'

const TokenKey = 'Adm-Token'
const RolesKey = 'Adm-Roles'
const RolesUserKey = 'Adm-User'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
export function getRoles() {
    return Cookies.get(RolesKey)
}

export function setRoles(roles) {
    return Cookies.set(RolesKey, roles)
}
export function getUser() {
    return Cookies.get(RolesUserKey)
}

export function setUser(user) {
    return Cookies.set(RolesUserKey, user)
}
export function removeToken() {
    Cookies.remove(TokenKey)
    Cookies.remove(RolesKey)
    Cookies.remove(RolesUserKey)
  return true
}
